﻿@model Sharp.Web.Models.MasterDataModel
@{
    var x = Html.X();
}
@(
 x.Window().Layout(LayoutType.Fit)
            .CloseAction(CloseAction.Destroy)
            .Width(385).Height(350)
            .Items(
                x.FormPanel().Default()
                    .Items(
                        x.HiddenFor(i => i.Id),
                        x.TextFieldFor(i => i.Code),
                        x.TextFieldFor(i => i.Name),
                        x.TextFieldFor(i => i.FullName),
                        x.TextFieldFor(i => i.Abbreviation),
                        x.ComboBoxFor(i => i.ParentCode).Data(Model.DropDown).ValueField("Code").DisplayField("Name"),
                        x.HiddenFor(i => i.AssemblyQualifiedName)
                    )
                    .Buttons(
                        x.Button().Text("提交").Icon(Icon.Disk)
                            .DirectEvents(de =>
                            {
                                de.Click.Action = "Save";
                                de.Click.EventMask.ShowMask = true;
                                de.Click.EventMask.Msg = "正在提交...";
                                de.Click.EventMask.MinDelay = 1000;
                                de.Click.Success = "App.Edit.PostBackSuccess";
                            }),
                        x.Button().Text("关闭").Icon(Icon.Cancel).OnClientClick("App.Edit.CloseWindow(this)")
                    )
            )

).